<?php

use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSystemStoreStaffsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('system_store_staffs', function (Blueprint $table) {
            $table->id()->comment('门店店员表');
            $table->integer('user_id')->index()->comment('用户id');
            $table->integer('store_id')->index()->comment('门店id');
            $table->string('avatar')->comment('店员头像');
            $table->string('staff_name',64)->nullable()->comment('店员名称');
            $table->char('phone',15)->nullable()->comment('手机号码');
            $table->tinyInteger('verify_status')->default(1)->comment('核销开关 0关 1开');
            $table->tinyInteger('status')->default(1)->comment('状态 0禁用 1正常');
            $table->SoftDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('system_store_staffs');
    }
}
